﻿using System.Collections.Generic;
using System.Web.UI;
using System.Linq;
using Ext.Net;
using KamLib;
using KamLib.Converts;

namespace WebPoligon
{
    public partial class CheckoutPage : Page
    {

        static CheckoutPage() { Ext.Net.UIS.Term.Register(Semantic.NewSemantic()); }

        //[DirectMethod]
        //public object GetStates(string action, Dictionary<string, object> extraParams)


        [DirectMethod]
        public object GetMonths()
        {
            return new[]
            {
                new object[] { 1, "January" },
                new object[] { 2, "February" },
                new object[] { 3, "March" },
                new object[] { 4, "April" },
                new object[] { 5, "May" },
                new object[] { 6, "June" },
                new object[] { 7, "Jule" },
                new object[] { 8, "August" },
                new object[] { 9, "September" },
                new object[] { 10, "October" },
                new object[] { 11, "November" },
                new object[] { 12, "December" },
            };
        }

        [DirectMethod]
        public object GetStates()
        {
            return new[]
            {
                "AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA",
                "KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND",
                "OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY" 
            }
            .Select(a => new[] { a }).ToArray();
        }

        [DirectMethod]
        public object GetCreditCardTypes()
        {
            return new[]
            {
                new object[] { 1, "VISA" },
                new object[] { 2, "MasterCard" },
                new object[] { 3, "American Express" },
                new object[] { 4, "Discover" },
            };
        }


    }
}